package com.monkeyboy.service;

import org.apache.rocketmq.client.consumer.MessageSelector;
import org.apache.rocketmq.client.producer.MessageQueueSelector;
import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.common.message.MessageQueue;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.MessageHeaders;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Gavin
 * @date 2020.08.18 17:52
 */
@Service
public class RocketMQProducer {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void producer() {
        rocketMQTemplate.convertAndSend("springboot-mq", "hello springboot rocketmq");
    }
}
